import RPi.GPIO as GPIO

class CarControl():
    def __init__(self):
        self.IN1_ = 11
        self.IN2_ = 12
        self.IN3_ = 13
        self.IN4_ = 15
        
        GPIO.setmode(GPIO.BOARD)
        GPIO.setup(self.IN1_, GPIO.OUT)
        GPIO.setup(self.IN2_, GPIO.OUT)
        GPIO.setup(self.IN3_, GPIO.OUT)
        GPIO.setup(self.IN4_, GPIO.OUT)
        
    def MoveOn(self):
        GPIO.output(self.IN1_, GPIO.HIGH)
        GPIO.output(self.IN2_, GPIO.LOW)
        GPIO.output(self.IN3_, GPIO.HIGH)
        GPIO.output(self.IN4_, GPIO.LOW)
 
    def BackOff(self):
        GPIO.output(self.IN1_, GPIO.LOW)
        GPIO.output(self.IN2_, GPIO.HIGH)
        GPIO.output(self.IN3_, GPIO.LOW)
        GPIO.output(self.IN4_, GPIO.HIGH)
 
    def TurnLeft(self):
        GPIO.output(self.IN1_, False)
        GPIO.output(self.IN2_, False)
        GPIO.output(self.IN3_, GPIO.HIGH)
        GPIO.output(self.IN4_, GPIO.LOW)
     
    def TurnRight(self):
        GPIO.output(self.IN1_, GPIO.HIGH)
        GPIO.output(self.IN2_, GPIO.LOW)
        GPIO.output(self.IN3_, False)
        GPIO.output(self.IN4_, False)
        

if __name__ == "__main__":
    car = CarControl()
    car.MoveOn()

    
    